package DBase;

/**
 * 
 * @author Dana & Elya
 */
public class Cell {
    
    private boolean containShip;
    private int ShipNum;
    private Coordinate coordinate;
    private String mark;
    
    /**
     * Cell Constructor
     * @param row cell row
     * @param column cell column
     */
    public Cell(int row, int column){
        
        coordinate=new Coordinate(row,column);
        containShip=false;
        ShipNum = 0;
        mark = " ";
    }

    /**
     * Sets the number of a ship in the cell
     * @param ShipNum the number of the ship
     */
    public void setShipNum(int ShipNum) {
        this.ShipNum = ShipNum;
    }
    
    /**
     * Sets a mark in the cell
     * @param mark the mark you want
     */
    public void setMark(String mark) {
        this.mark = mark;
    }

    /**
     * Gets the mark in the cell
     * @return mark
     */
    public String getMark() {
        return mark;
    }
    
    /**
     * Gets a boolean if the cell contains a ship
     * @return containShip-true if contains a ship,false otherwise
     */
    public Boolean getContainShip() {
        return containShip;
    }

    /**
     * Gets the ship number in the cell
     * @return shipNum
     */
    public int getShipNum() {
        return ShipNum;
    }
    
    /**
     * Sets if the cell contains a ship and it's number
     * @param containShip
     * @param ShipNum
     */
    public void setContainShip(Boolean containShip, int ShipNum) {
        this.containShip = containShip;
        this.ShipNum= ShipNum;
    }
    
    /**
     * Sets if the cell contains ship
     * @param containShip true if contains a ship,false otherwise
     */
    public void setContainShip(Boolean containShip) {
        this.containShip = containShip;
       
    }
    
}
